import request from "@/utils/request";

//多条件分页查询车辆信息
export function getTruckListByPage(truckDto){
  return request({
    url: '/pd-base/truck/getTruckListByPage',
    method: "POST",
    data: truckDto
  })
}
//删除车辆信息
export function deleteTruck(truckBean){
  return request({
    url: '/pd-base/truck/deleteTruck',
    method: 'POST',
    data: truckBean
  })
}
//根据ID查询车辆详情信息
export function queryTruckDetailsById(id){
  return request({
    url:`/pd-base/truck/queryTruckDetailsById/${ id }`,
    method: "GET",
    params: id
  })
}
//根据车辆ID查询所属线路和所属车次
export function queryTruckNumberAndLineById(id){
  return request({
    url: `/pd-base/truck/queryTruckNumberAndLineById/${ id }`,
    method: "GET",
    params: id
  })
}
//修改车辆信息
export function updateTruck(truckBean){
  return request({
    url: '/pd-base/truck/updateTruck',
    method: 'POST',
    data: truckBean
  })
}
//添加车辆信息
export function addTruck(addTruckDto){
  return request({
    url: '/pd-base/truck/addTruck',
    method: 'POST',
    data: addTruckDto
  })
}


